home *** CD-ROM | disk | FTP | other *** search
- /*
- fxPLUGINs Header-file
- ©1999 by Felix Schwarz. All rights reserved.
- */
-
- #ifndef _FXPLUGIN_H
- #define _FXPLUGIN_H 1
-
- #define MODE_DRAG 0L
- #define MODE_DRAW 1L
-
- struct PluginInfo
- {
- /* Version stuff*/
- LONG int_version; /* Versionnumber of the plugin */
- LONG int_revision; /* Revision of the plugin */
- LONG fxp_version; /* Versionnumber of the used fxPAINT Plugin-SDK */
-
- /* Name and copyright stuff */
- UBYTE *plugin_name; /* Name of your plugin */
- UBYTE *filter_name; /* Name of the contained filter (if contained :) */
- UBYTE *saver_name; /* Name of the contained format the saver creates, if one is contained */
- UBYTE *plugin_description; /* Description for the plugin */
- UBYTE *author_name; /* Your name */
- UBYTE *author_company; /* Name of your company */
- UBYTE *author_copyright; /* Name of your company */
- UBYTE *logo_file; /* Your logo-image in fxPAINT:Plugins/Logo/ */
- UBYTE *help_file; /* The help-file/docu for your plugin */
-
- /* Plugin-descriptor */
- ULONG plugin_kind; /* Kind of plugin */
- ULONG plugin_flags; /* Flags */
-
- APTR plugin_space; /* Pointer to memory needed by your plugin.
- If you don`t need additional memory, set this to
- NULL */
- };
-
- struct PluginInit
- {
- /* GUI Functions needed for graphic plugins */
- struct Gadget * (* gui_crflexgad) (struct Gadget **glistptr, long winid, long x, long y, long border, long wid, ... );
- struct Window * (* gui_openfix) (char *title, ULONG idcmp, long id, long x, long y, long addwid, long addhei);
- void (* gui_drboxsel) (long id, long x, long y, long w, long h);
- ULONG blank; /* This field for future usage .. */
-
- /* Gfx Output funcs */
- BOOL (* fxp_drawfsb) (struct Window *win, struct Screen *scr, struct fsbitmap *fsb, long xpos, long ypos);
- BOOL (* fxp_drawscaledfsb) (struct Window *win, struct Screen *scr, struct fsbitmap *fsb, long xpos, long ypos, long wid, long hei);
- BOOL (* fxp_drawfitfsb) (struct Window *win, struct Screen *scr, struct fsbitmap *fsb, long xpos, long ypos, long wid, long hei);
-
- /* An important pointer for YOU :) */
- APTR plugin_space;
-
- /* The rest of the API resides here */
- ULONG (* fxpaint_api) (long mode, ULONG attr, ULONG value, ULONG value2, ULONG value3, ULONG value4);
-
- ULONG pluginid; /* ID to use with add & remove port ..*/
- };
-
- struct PluginFilter
- {
- struct PluginInit *pli; /* As for FXPlug_InitPlugin */
- APTR PluginData; /* pointer to your allocated data */
- struct fsbitmap *fsb; /* Source and destination fsb */
- long fx_x; /* X and Y coordinates in "positioningmode" */
- long fx_y;
- };
-
- struct PluginGUI
- {
- struct PluginInit *pli; /* As for FXPlug_InitPlugin */
- APTR fxp_gui; /* pointer to the fx_gui */
- long yourwin; /* the ID of your window */
- APTR PluginData; /* pointer to your allocated data */
- long gui_ghei; /* Height of single image */
- long gui_gsep; /* Vertical Distance between gads */
- BOOL realtime; /* Is the realtime-mode activated ?
- If yes, you should perform an fx_recalc
- after every change of the settings.
- */
- long posimode; /* Positioningmode ? (== e.g. for dragging
- around a lightsource, etc.. the coordinates
- are then contained in fx_x and fx_y of PluginFilter.
- You can change this setting in this structure between
- MODE_DRAG and MODE_DRAW
- */
- struct IntuiMessage *imsg; /* Message in a bottle ... :) */
- };
-
- struct PluginIdent
- {
- struct PluginInit *pli; /* As for FXPlug_InitPlugin */
- APTR header_data; /* Pointer to already loaded data from the
- beginning of the file */
- ULONG header_length; /* Number of bytes at header_data */
- UBYTE *file_name; /* The name of the file to identify
- Please use header_data to identify an
- image, whereever possible and don`t
- open the file, if it isn`t needed. */
- };
-
- struct PluginImageInfo
- {
- BOOL identified; /* Is this image readable by your plugin ? */
- BOOL size_identified; /* Could you already get image width and height
- out of the passed header ? */
- ULONG width; /* If yes, put the image`s dimensions here! */
- ULONG height;
- };
-
- struct PluginLoadImage
- {
- struct PluginInit *pli; /* As for FXPlug_InitPlugin */
- UBYTE *file_name; /* Filename of the image to load */
- };
-
- struct PluginSaveImage
- {
- struct PluginInit *pli; /* As for FXPlug_InitPlugin */
- struct fsbitmap *fsb; /* Image data to save */
- UBYTE *file_name; /* Filename to save the image as! */
- APTR fxp_gui; /* Pointer to a valid FXGUI-structure for
- all the saver-options (if there are any!)
- */
- };
-
- struct PluginHandlePorts
- {
- struct PluginInit *pli; /* As for FXPlug_InitPlugin */
- };
-
-
- struct PluginBye
- {
- struct PluginInit *pli;
- APTR allocatedmem;
- };
-
- struct PluginLaunch
- {
- struct PluginInit *pli;
- };
-
- struct fx_rectangle
- {
- long x1;
- long y1;
- long x2;
- long y2;
- };
-
- struct fx_bevelbox
- {
- long x1;
- long y1;
- long x2;
- long y2;
- long fbev;
- long tbev;
- long meth;
- long kind;
- };
-
- struct PluginReg
- {
- struct PluginInit *pli;
- long rclass;
- long reg;
- long content;
- long reserved;
- APTR PluginData;
- };
-
- /* Some classes tags */
- #define CL_USER TAG_USER
- #define CL_TOGGABLE (TAG_USER + 1)
- #define CL_TOGGLED (TAG_USER + 2)
- #define CL_SAFETY (TAG_USER + 3)
- #define CL_MAX (TAG_USER + 4)
- #define CL_MIN (TAG_USER + 5)
- #define CL_LV_FORMAT (TAG_USER + 6)
- #define CL_LV (TAG_USER + 7)
- #define CL_DIGITS (TAG_USER + 8)
- #define CL_COLSPACE (TAG_USER + 9)
- #define CL_MESSAGEP (TAG_USER + 10)
- #define CL_GAUGEPOS (TAG_USER + 11)
- #define CL_TEXTWIDTH (TAG_USER + 12)
- #define CL_TEXT (TAG_USER + 13)
- #define CL_LABELS (TAG_USER + 14)
- #define CL_ENTRY (TAG_USER + 15)
- #define CL_SORTED (TAG_USER + 16)
- #define CL_POP_STATICFSB (TAG_USER + 17)
- #define CL_POP_VERT (TAG_USER + 18)
- #define CL_POP_NUMLABEL (TAG_USER + 19)
- #define CL_POP_CHLABEL (TAG_USER + 20)
- #define CL_POP_LABELFSB (TAG_USER + 21)
- #define CL_HELPTXT (TAG_USER + 22)
- #define CL_HELPID (TAG_USER + 23)
- #define CL_IMAGE (TAG_USER + 24)
-
- /* Accepted values for "Kind" */
- #define PLG_FILTER 1L
- #define PLG_LOADER 2L
- #define PLG_SAVER 4L
- #define PLG_LAUNCHABLE 8L
- #define PLG_HAVEPORTS 16L
- #define PLG_DISPLAYDRIVER 32L
- #define PLG_MENULAUNCHABLE 64L
-
- /* Accepted flags for "Flags" */
- #define PLG_FLG_LAUNCHMEATSTART 1L
-
- /* Method-Types */
- #define FX_METHOD_GET 1L
- #define FX_METHOD_SET 2L
- #define FX_METHOD_PERFORM 3L
- #define FX_METHOD_DRAW 4L
-
- /* Set & Get submethods */
- #define FX_ACTIVE_WIN 1L /* SET-Syntax: ok=(active)
- GET-Syntax: active=() */
-
- #define FX_WIN_MAXNUMBER 2L /* GET-Syntax: maxnumber=() */
-
- #define FX_WIN_EXISTANCE 3L /* GET-Syntax: exists=(winid) */
-
- #define FX_WIN_NUMBEROFLAYERS 4L /* GET-Syntax: nol=(windid) */
-
- #define FX_WIN_LAYER 5L /* GET-Syntax: fsb=(winid,layer) */
-
- #define FX_WIN_BG_IMAGE 6L /* GET-Syntax: fsb=(winid,layer) */
-
- #define FX_WIN_FG_IMAGE 7L /* GET-Syntax: fsb=(winid,layer) */
-
- #define FX_WIN_FILENAME 8L /* SET-Syntax: ok=(newname)
- GET-Syntax: name=(winid) */
-
- #define FX_WIN_ICONIFIED 9L /* SET-Syntax: (newstatus)
- GET-Syntax: status=(winid) */
-
- #define FX_WIN_RGB 10L /* SET-Syntax: (win, (r<<24|g<<16|b<<8))
- GET-Syntax: r<<24|g<<16|b<<8=(winid)*/
-
- #define FX_WIN_ACTIVEPEN_ID 11L /* SET-Syntax: ok=(newpenid)
- GET-Syntax: penid=(winid) */
-
- #define FX_PEN_ID_EXISTANCE 12L /* GET-Syntax: exist=(penid) */
-
- #define FX_PEN_MAX_ID 13L /* GET-Syntax: maxpens=() */
-
- #define FX_PEN_ID_COVER 14L /* GET-Syntax: coverfsb=(penid) */
-
- #define FX_PEN_ID_NAME 15L /* SET-Syntax: ok=(penid,name)
- GET-Syntax: name=(penid) */
-
- #define FX_PEN_ID_FRAMES 16L /* GET-Syntax: frames=(penid) */
-
- #define FX_PEN_ID_FRAME_FSB 17L /* GET-Syntax: framefsb=(penid,frame) */
-
- #define FX_PALETTE_MAX 18L /* GET-Syntax: max=() */
-
- #define FX_PALETTE_SELENTRY 19L /* SET-Syntax: (winid, selentry)
- GET-Syntax: selentry=() */
-
- #define FX_PALETTE_ENTRYRGB 20L /* SET-Syntax: ok=(entry,(r<<24|g<<16|b<<8)
- GET-Syntax: r<<24|g<<16|b<<8=(entry) */
-
- #define FX_GUI_SLIDER 21L /* SET-Syntax: (win,gid,value)
- GET-Syntax: value=(window, gid) */
-
- #define FX_GUI_CHECKBOX 22L /* SET-Syntax: (win,gid,value)
- GET-Syntax: value=(window, gid) */
-
- #define FX_GUI_MY_FX_WIN_ID 23L /* GET-Syntax: value=() */
- #define FX_GUI_BUTTON_CLASS_PTR 24L /* GET-Syntax: classptr=() */
- #define FX_GUI_IMAGE_CLASS_PTR 25L /* GET-Syntax: classptr=() */
- #define FX_GUI_SLIDER_CLASS_PTR 26L /* GET-Syntax: classptr=() */
- #define FX_GUI_CHECKBOX_CLASS_PTR 27L /* GET-Syntax: classptr=() */
- #define FX_GUI_GAUGE_CLASS_PTR 28L /* GET-Syntax: classptr=() */
- #define FX_GUI_CYCLE_CLASS_PTR 29L /* GET-Syntax: classptr=() */
- #define FX_GUI_POPUP_CLASS_PTR 30L /* GET-Syntax: classptr=() */
-
- #define FX_GUI_SEL_GRAD 31L /* SET-Syntax: (newgradfsb)
- GET-Syntax: selgradfsb=() */
-
- #define FX_GUI_USEL_GRAD 32L /* SET-Syntax: (newgradfsb)
- GET-Syntax: uselgradfsb=() */
-
- #define FX_GUI_SCREEN 33L /* GET-Syntax: screen=() */
-
- #define FX_GUI_VISUALINFO 34L /* GET-Syntax: visualinfo=() */
-
- #define FX_GUI_DRAWINFO 35L /* GET-Syntax: drawinfo=() */
-
- #define FX_GAUGE_PROGRESS 36L /* SET-Syntax: (newgaugevalue)*/
-
- #define FX_GAUGE_PROGRESSTEXT 37L /* SET-Syntax: (newgaugetext) */
-
- #define FX_WIN_POSITION 38L /* SET-Syntax: (winid, newx, newy)
- GET-Syntax: (winid, &x, &y) */
-
- #define FX_GUI_GHEI 39L /* GET-Syntax: gadgethei=() */
-
- #define FX_WIN_EFFECT 40L /* SET-Syntax: (winid, effectid)
- GET-Syntax: effectid = (winid,layer) */
-
- #define FX_WIN_TYPE 41L /* SET-Syntax: (winid, newtype, layer)
- GET-Syntax: type = (winid,layer) */
-
- #define FX_WIN_DRAWMETHOD 42L /* SET-Syntax: (winid, newmethod, layer)
- GET-Syntax: method = (winid,layer) */
-
- #define FX_WIN_ALPHA 43L /* SET-Syntax: (winid, alphawin)
- GET-Syntax: alphawin = (winid) */
-
- #define FX_WIN_ALPHAACTIVE 44L /* SET-Syntax: (winid, alphaactive)
- GET-Syntax: alphaactive = (winid) */
-
- #define FX_PLUGIN_EFFECTID 45L /* GET-Syntax: pluginid = (plugin-name) */
-
- #define FX_PLUGIN_EFFECTCONVERT 46L /* GET-Syntax: effectid = (group,effect)*/
-
- #define FX_WIN_MSGPORT 47L /* GET-Syntax: msgport = () */
-
- #define FX_WIN_WINDOWSTRUCT 48L /* GET-Syntax: window = (winid) */
-
- #define FX_WIN_PENPRESSURE 49L /* SET-Syntax: (newpressure)
- GET-Syntax: pressure = () */
-
- #define FX_WIN_EFFECTREGISTER 50L /* SET-Syntax: (winid, register, value) */
-
- #define FX_ALBUM_ENTRIES 51L /* GET-Syntax: entries = () */
-
- #define FX_ALBUM_FILENAME 52L /* GET-Syntax: name = (entry) */
-
- #define FX_ALBUM_THUMBNAIL 53L /* GET-Syntax: thumbfsb = (entry) */
-
- #define FX_WB_SCREEN 54L /* GET-Syntax: screen = () */
-
- #define FX_GUI_DISTX 55L /* GET-Syntax: distx = () */
-
- #define FX_GUI_DISTY 56L /* GET-Syntax: disty = () */
-
- #define FX_IO_PCD_ENABLED 57L /* Don`t use this one!! For internal use ONLY! */
-
- /* Performable submethods */
- #define FX_PLUGIN_ADDPORT 1L /* Syntax: (sigbits, pluginid) */
- #define FX_PLUGIN_REMPORT 2L /* Syntax: (sigbits, pluginid) */
- #define FX_PLUGIN_LOADPIC 3L /* Syntax: picfsb=(filename) */
- #define FX_PLUGIN_FXRECALC 4L /* Syntax: () */
- #define FX_PLUGIN_GUI_CLOSENFREE 5L /* Syntax: (window) */
- #define FX_PLUGIN_FIND_STR_IN_BUF 6L /* Syntax: BOOL=(buf,buflen,str) */
- #define FX_PLUGIN_FSALLOCBITMAP 7L /* Syntax: fsb=(wid,hei,type), type=3 -> 24Bit-bitmap */
- #define FX_PLUGIN_FSFREEBITMAP 8L /* Syntax: (fsb) */
- #define FX_PLUGIN_CSTALLOCVEC 9L /* Syntax: ptr=(size,flags) */
- #define FX_PLUGIN_CSTFREEVEC 10L /* Syntax: (ptr) */
- #define FX_FSLIB_DITHERTO256 11L /* Syntax: retfsb=(fsb,palette) */
- #define FX_FSLIB_SCALECOPY 12L /* Syntax: retfsb=(fsb,newwid,newhei */
- #define FX_DEBUG_WRITETEXT 13L /* Syntax: (text) */
- #define FX_WIN_ZOOM_PLUS 14L /* Syntax: (winid) */
- #define FX_WIN_ZOOM_MINUS 15L /* Syntax: (winid) */
- #define FX_WIN_GETZOOM 16L /* Syntax: zoom=(winid) */
- #define FX_WIN_REFRESH 17L /* Syntax: (winid) */
- #define FX_WIN_MERGE 18L /* Syntax: fsb=(x1,y1,x2,y2) */
- #define FX_DEBUG_WRITETEXTNUMBER 19L /* Syntax: (text,number) */
- #define FX_WIN_FROMFSB 20L /* Syntax: newwinid=(fromfsb) */
- #define FX_PLUGIN_SAVEPIC 21L /* Syntax: (name,fsb,format,opts) */
- #define FX_FSLIB_CLONEBITMAP 22L /* Syntax: cloned=(fsb) */
- #define FX_FSLIB_DITHERTO256FAST 23L /* Syntax: retfsb=(fsb,plaette) */
- #define FX_ALBUM_ADDFILE 24L /* Syntax: (dir) */
- #define FX_ALBUM_ADDDIR 25L /* Syntax: (file) */
- #define FX_CONV_ADDSOURCE 26L /* Syntax: (soure) */
- #define FX_LOADPICASNEWPROJECT 27L /* Syntax: (file) */
- #define FX_HELP_SHOWGUIDE 28L /* Syntax: (guide,node) */
- #define FX_ASL_FILEREQUESTER 29L /* Syntax: file=(file,title) */
-
- /* Draw methods */
- #define FX_DRAW_DOT 1L /* (winid, x, y, method) */
- #define FX_DRAW_BOX 2L /* (winid, struct fx_rectangle*, method) */
- #define FX_DRAW_ELLIPSE 3L /* (winid, struct fx_rectangle*, method) */
- #define FX_DRAW_LINE 4L /* (winid, struct fx_rectangle*, method) */
- #define FX_DRAW_FILLEDBOX 5L /* (winid, struct fx_rectangle*, method) */
- #define FX_DRAW_FILLEDELLIPSE 6L /* (winid, struct fx_rectangle*, method) */
- #define FX_DRAW_FLOODFILL 7L /* (winid, x, y, method) */
- #define FX_DRAW_BEVELBOX 8L /* (winid, struct fx_bevelbox*, method) */
- #define FX_DRAW_CUT 9L /* (winid, struct fx_rectangle*) */
- #define FX_DRAW_SMEARLINE 10L /* (winid, struct fx_rectangle*, method) */
-
- #endif
-